/*************************************************************************
	> File Name: AbstractFactory.cc
	> Author: Joker
	> Mail: mahongtao@foxmail.com 
	> Created Time: 2020-09-21 19:47:47
 ************************************************************************/

#include "AbstractProduct.h"
#include "AbstractFactory.h"

#include <iostream>

using std::cout;
using std::endl;

ConcreateFactory1::ConcreateFactory1(){
    cout << ">> Construction of ConcreateFactory1" << endl;
}

ConcreateFactory1::~ConcreateFactory1(){
    cout << ">> Destruction of ConcreateFactory1" << endl;
}

AbstractProductA * ConcreateFactory1::CreateProductA(){
    return new ConcreateProductA1();
}

AbstractProductB * ConcreateFactory1::CreateProductB(){
    return new ConcreateProductB1();
}


ConcreateFactory2::ConcreateFactory2(){
    cout << ">> Construction of ConcreateFactory2" << endl;
}

ConcreateFactory2::~ConcreateFactory2(){
    cout << ">> Destruction of ConcreateFactory2" << endl;
}

AbstractProductA * ConcreateFactory2::CreateProductA(){
    return new ConcreateProductA2();
}

AbstractProductB * ConcreateFactory2::CreateProductB(){
    return new ConcreateProductB2();
}

